package com.lxq.test1809.Main01;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        int[] b = new int[n];

        for (int i=0;i<n;i++){
            a[i] = sc.nextInt();
        }

        for (int i=0;i<n;i++){
            if (i==0){
                b[i] = (a[i]+a[i+1])/2;
                continue;
            }
            if (i==n-1){
                b[i] = (a[i-1]+a[i])/2;
                continue;
            }
            b[i] = (a[i-1]+a[i]+a[i+1])/3;
        }
        for (int i:b
             ) {
            System.out.print(i+" ");
        }

    }
}
